package otherapi;

import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author 李栋
 * @version 1.0.0
 * @className HexadecimalConvertTest.java
 * @createTime 2021年07月19日 21:51:00
 */
public class HexadecimalConvertTest {

    private static final Logger logger = LoggerFactory.getLogger(HexadecimalConvertTest.class);



    @Test
    public void test(){
        int num =20;
        // 二进制
        String one = Integer.toBinaryString(num);
        logger.info(one);

        // 十六进制
        String two = Integer.toHexString(num);
        logger.info(two);

        // 八进制
        String three = Integer.toOctalString(num);
        logger.info(three);

    }

}
